using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace HarrisDesigns.Controls.dasBlogControls.Google.Reader
{
    public class Feed
    {
        [JsonProperty("id")]
        public string Id { get; set; }

        [JsonProperty("title")]
        public string Title { get; set; }

        [JsonProperty("continuation")]
        public string Continuation { get; set; }

        [JsonProperty("author")]
        public string Author { get; set; }

        [JsonProperty("updated")]
        public int UpdatedSeconds { get; set; }

        [JsonIgnore]
        public DateTime Updated
        {
            get
            {
                return (new DateTime(1970,1,1)).AddSeconds(UpdatedSeconds);
            }
        }

        [JsonProperty("items")]
        public List<FeedItem> FeedItems { get; set; }
    }
}